﻿using Magicodes.ExporterAndImporter.Excel.AspNetCore;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NP.BPMReportPlatform.AUTO.Adjust.Dto;
using NP.BPMReportPlatform.AUTO.Quotation.Dto;
using NP.BPMReportPlatform.AUTO.TechnicalDependence.Dto;
using NP.BPMReportPlatform.IC.ICZHYLS.Dto;
using System.Data;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace NP.BPMReportPlatform.IC
{

    /// <summary>
    /// IC 综合依赖书
    /// </summary>
    //[Authorize]
    [ApiController]
    [Route("api/iczhyls")]
    public class ICZHYLSController : BPMReportPlatformController
    {

        private readonly IICZHYLSAppService _iczhylsService;

        public ICZHYLSController(IICZHYLSAppService iczhylsService)
        {
            _iczhylsService = iczhylsService;
        }

        /// <summary>
        ///IC综合依赖书审批流程 查询数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/GetAllAsync")]
        public async Task<PagedResultDto<ICZHYLSOutput>> GetAllAsync([FromBody] GetICZHYLSInput input)
        {
            return await _iczhylsService.GetAllAsync(input);
        }

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export1Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput1>> Export1Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export1Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput1>(rst, "导出Excel");
        }

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export21Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput21>> Export21Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export21Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput21>(rst, "导出Excel");
        }

      


        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export3Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput3>> Export3Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export3Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput3>(rst, "导出Excel");
        }


        ///// <summary>
        /////IC综合依赖书审批流程 导出数据
        ///// </summary>
        ///// <param name="input"></param>
        ///// <returns></returns>
        //[HttpPost]
        //[Route("ICZHYLS/Export31Async")]
        //public DataTable Export31Async([FromBody] GetICZHYLSInput input)
        //{
        //    var rst = _iczhylsService.Export31Async(input);
        //    DataTable xlsxFileResult = new DataTable(
        //                    (System.Collections.Generic.ICollection<DataTable>)rst, "导出Excel");
        //    return xlsxFileResult;
        //}

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export4Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput4>> Export4Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export4Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput4>(rst, "导出Excel");
        }

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export5Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput5>> Export5Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export5Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput5>(rst, "导出Excel");
        }

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export6Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput6>> Export6Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export6Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput6>(rst, "导出Excel");
        }

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export7Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput7>> Export7Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export7Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput7>(rst, "导出Excel");
        }

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export8Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput8>> Export8Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export8Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput8>(rst, "导出Excel");
        }

        /// <summary>
        ///IC综合依赖书审批流程 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("ICZHYLS/Export9Async")]
        public async Task<XlsxFileResult<ExportICZHYLSOutput9>> Export9Async([FromBody] GetICZHYLSInput input)
        {
            var rst = await _iczhylsService.Export9Async(input);
            return new XlsxFileResult<ExportICZHYLSOutput9>(rst, "导出Excel");
        }
    }
}
